1. Field of the Invention
The present invention relates to a structural element detecting method, a structural element detecting apparatus, and a structural element detecting program, for detecting predetermined structural elements, which are included in predetermined subjects, from within images that include the predetermined subjects.
2. Description of the Related Art
There are cases in which pupils (or portions of pupils) of people or animals, photographed by flash photography at night or in dark places, are photographed as being red or gold. For this reason, various methods for correcting the color of pupils, which have been photographed as being red or gold (hereinafter, cases in which pupils are photographed as being gold are also referred to as “red eye”), to normal pupil colors by digital image processing have been proposed.
For example, Japanese Unexamined Patent Publication No. 2000-013680 discloses a method and apparatus for automatically discriminating red eyes. This method and apparatus automatically discriminate red eyes based on colors, positions, and sizes of pupils within a region specified by an operator. Japanese Unexamined Patent Publication No. 2001-148780 discloses a method wherein: predetermined characteristic amounts are calculated for each pixel within a region specified by an operator; and portions having characteristics that correspond to pupil portions are selected as targets of correction. However, in discriminating processes which are based solely on characteristics of pupil portions, it is difficult to discriminate targets having local redness, such as red lighting, from red eyes. For this reason, it is difficult for this process to be executed automatically, without operator intervention.
On the other hand, Japanese Unexamined Patent Publication No. 2000-125320 discloses a method wherein: faces are detected first; and red eye detection is performed within regions detected to be faces. In this method, false positives, such as red lights being detected as red eyes, does not occur. However, if errors occur during face detection, red eyes cannot be accurately detected. Therefore, the accuracy of the facial detection becomes an issue.
The simplest method for detecting faces is to detect oval skin colored regions as faces. However, people's faces are not necessarily uniform in color. Therefore, it is necessary to broadly define “skin color”, which is judged to be the color of faces. However, the possibility of false positive detection increases in the case that the range of colors is broadened in a method that judges faces based only on color and shape. For this reason, it is preferable that faces are judged utilizing finer characteristics than just the color and the shapes thereof, in order to improve the accuracy of facial detection. However, if characteristics of faces are extracted in detail, the time required for facial detection processes greatly increases.
That is, the method disclosed in Japanese Unexamined Patent Publication No. 2000-125320 is capable of detecting red eyes with high accuracy, yet gives no consideration to processing time. In the case that the method is applied to an apparatus having comparatively low processing capabilities (such as a low cost digital camera), the apparatus cannot function practically.